package net.mymilkedeek.ludum.tinythumb;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.geom.Polygon;

/**
 * TODO: Write Documentation
 *
 * @author Michael Demey
 */
public class Collision {

    private Polygon polygon;

    public Collision(int x, int y, int array[]) {
        polygon = new Polygon(new float[]{
                x + array[0], y + array[1],
                x + array[2], y + array[3],
                x + array[4], y + array[5],
                x + array[6], y + array[7],
                x + array[0], y + array[1]
        });
    }

    public void draw(Graphics graphics) {
        graphics.draw(polygon);
    }

    public Polygon getPolygon() {
        return polygon;
    }
}
